#include <stdio.h>
#include <time.h>

int main() {
    int yearA, monthA, dayA;
    scanf("%d%d%d", &yearA, &monthA, &dayA);
    int yearB, monthB, dayB;
    scanf("%d%d%d", &yearB, &monthB, &dayB);
    struct tm timeA = {0};
    timeA.tm_year = yearA - 1900;
    timeA.tm_mon = monthA - 1;
    timeA.tm_mday = dayA;
    // tm_year指该事件从1900年来过去了多少年，tm_mon指就1月过去了几月
    struct tm timeB = {0};
    timeB.tm_year = yearB - 1900;
    timeB.tm_mon = monthB - 1;
    timeB.tm_mday = dayB;
    /* time_t mktime(struct tm *timeptr) 把 timeptr 所指向的结构转换为自
    1970 年 1 月 1 日以来持续时间的秒数，发生错误时返回-1 */
    /* double difftime(time_t time2, time_t time1)，得到两次机器时间差，单位为秒 */
    double result = difftime(mktime(&timeA), mktime(&timeB));
    printf("%.6lf", result);
    return 0;
}